/**
 * File: cs3343-Satir-Therapy/src/programtest/PlayerTest.java
 *  
 * Responsible author: Lai Hing Hung, Dennis					Revision no: 1.0
 * Checked in at date: 2012/02/
 * Log: testCreate(), testPosition()
 * 
 * 
 */
package programtest;
import junit.framework.*;
import program.Player;

public class PlayerTest extends TestCase {
	
	/**
	 * Test create.
	 */
	public void testCreate(){
		
		Player player1 = new Player("1", "Dennis Lai", "Father", 1, 5);
	    assertEquals("Dennis Lai", player1.getName());
	    
	}
	
	public void testPosition(){
		Player player1 = new Player("1", "Dennis Lai", "Father", 1, 5);
		player1.move(5); // move player1 from grid 1 to grid 6
	    assertEquals(6, player1.getPosition());
	    player1.move(23); // move player1 from grid 6 to grid 1
	    assertEquals(1, player1.getPosition());
	}
}
